<?php

namespace App\Model;

use App\BaseModel;

class ProductAttrGroup extends BaseModel
{
    protected $table = "product_attr_groups";

    protected $fillable = ['name'];

    public function labels()
    {
        return $this->hasMany('App\Model\ProductAttrLabel','attr_group_id','id')
            ->orderBy('product_attr_labels.sort','asc')
            ->orderBy('product_attr_labels.id','asc');
    }
}
